﻿<%@ Page Title="Editar Entidad" Language="C#" MasterPageFile="~/MasterPage.master"
	AutoEventWireup="true" CodeFile="EditEnterprise.aspx.cs" Inherits="Enterprise_EditEnterprise" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="../Location/EditLocation.ascx" TagName="EditLocation" TagPrefix="uc1" %>
<%@ Register Src="../General/AuditoryData.ascx" TagName="AuditoryData" TagPrefix="uc2" %>
<%@ Register Assembly="ESF.Web" Namespace="ESF.Web.ServerControls" TagPrefix="esf" %>
<asp:Content ID="cntContenido" ContentPlaceHolderID="cntContenido" runat="Server">
	<asp:Panel ID="pnlForm" CssClass="divForm" runat="server" DefaultButton="btnSave">
		<div class="header">
			<div class="icon">
			</div>
			<div class="title">
				<asp:Label ID="lblTitle" runat="server"></asp:Label>
			</div>
		</div>
		<asp:UpdatePanel ID="updFields" runat="server" UpdateMode="Conditional">
			<Triggers>
				<asp:AsyncPostBackTrigger ControlID="btnClear" />
			</Triggers>
			<ContentTemplate>
				<asp:TabContainer ID="tabContainer" CssClass="tabContainer" runat="server">
					<asp:TabPanel ID="tabGeneral" runat="server" HeaderText="General">
						<ContentTemplate>
							<div class="divField divField_half">
								<div class="label">
									Tipo Identificación *
									<asp:RequiredFieldValidator ID="rfvddlIdentificationType" ControlToValidate="ddlIdentificationType"
										runat="server" ErrorMessage="Seleccione el Tipo de Identificación" Text="*"></asp:RequiredFieldValidator>
								</div>
								<div class="field">
									<asp:DropDownList ID="ddlIdentificationType" runat="server" Width="220px">
									</asp:DropDownList>
								</div>
							</div>
							<div class="divField divField_half">
								<div class="label">
									Identificación * / Digito Verif.
									<asp:RequiredFieldValidator ID="rfvtxtIdentificationNumber" ControlToValidate="txtIdentificationNumber"
										runat="server" ErrorMessage="Diligencie el Número de Identificación" Text="*"></asp:RequiredFieldValidator>
								</div>
								<div class="field">
									<asp:TextBox ID="txtIdentificationNumber" MaxLength="20" Width="100px" runat="server"></asp:TextBox>
									<asp:TextBox ID="txtIdentificationNumberDigit" MaxLength="3" Width="40px" runat="server"></asp:TextBox>
								</div>
							</div>
							<div class="divField divField_half">
								<div class="label">
									Abreviatura *
									<asp:RequiredFieldValidator ID="rfvtxtCode" ControlToValidate="txtCode" runat="server"
										ErrorMessage="Diligencie la Abreviatura" Text="*"></asp:RequiredFieldValidator>
								</div>
								<div class="field">
									<asp:TextBox ID="txtCode" runat="server" CssClass="W300"></asp:TextBox>
								</div>
							</div>
							<div class="divField">
								<div class="label">
									Nombre *
									<asp:RequiredFieldValidator ID="rfvtxtName" ControlToValidate="txtName" runat="server"
										ErrorMessage="Diligencie el Nombre" Text="*"></asp:RequiredFieldValidator>
								</div>
								<div class="field">
									<asp:TextBox ID="txtName" runat="server" MaxLength="500" CssClass="W300"></asp:TextBox>
								</div>
							</div>
							<uc1:EditLocation ID="uscEditLocation" EnableValidators="false" runat="server" />
						</ContentTemplate>
					</asp:TabPanel>
					<asp:TabPanel ID="tabTerminals" runat="server" HeaderText="Terminales">
						<ContentTemplate>
							<asp:UpdatePanel ID="updTerminals" runat="server" UpdateMode="Conditional">
								<ContentTemplate>
									<div class="divField">
										<div class="label">
											Consultar Terminal *
											<asp:RequiredFieldValidator ID="rfvtxtQueryTerminal" runat="server" ControlToValidate="txtQueryTerminal"
												MaxLength="60" Display="Dynamic" SetFocusOnError="true" Text="*" ErrorMessage="Diligencie un número de terminal para adicionarla"
												ValidationGroup="valTerminals"></asp:RequiredFieldValidator>
										</div>
										<div class="field">
											<asp:TextBox ID="txtQueryTerminal" runat="server" MaxLength="30"></asp:TextBox>
											<asp:AutoCompleteExtender ID="txtQueryTerminal_AutoCompleteExtender" runat="server"
												Enabled="True" ServiceMethod="QueryTerminals" TargetControlID="txtQueryTerminal"
												CompletionInterval="1100" CompletionSetCount="15" MinimumPrefixLength="3">
											</asp:AutoCompleteExtender>
										</div>
										<div class="divOperations">
											<asp:Button ID="btnAddTerminal" Text="Adicionar" ValidationGroup="valTerminals"
												runat="server" OnClick="btnAddTerminal_Click" UseSubmitBehavior="false" />
											<asp:Button ID="btnRemoveTerminal" Text="Remover" CausesValidation="false" UseSubmitBehavior="false" runat="server"
												OnClick="btnRemoveTerminal_Click" />
										</div>
									</div>
									<div class="divField">
										<div class="label">
											Terminales Asociadas
										</div>
										<div class="field" style="width: 300px; height: 200px; overflow: auto;">
											<asp:CheckBoxList ID="chkTerminalList" runat="server">
											</asp:CheckBoxList>
										</div>
									</div>
								</ContentTemplate>
							</asp:UpdatePanel>
						</ContentTemplate>
					</asp:TabPanel>
					<asp:TabPanel ID="tabAuditory" runat="server" HeaderText="Auditoria">
						<ContentTemplate>
							<uc2:AuditoryData ID="uscAuditoryData" runat="server" />
						</ContentTemplate>
					</asp:TabPanel>
				</asp:TabContainer>
				</div>
			</ContentTemplate>
		</asp:UpdatePanel>
		<asp:UpdatePanel ID="updOperations" runat="server" UpdateMode="Conditional">
			<ContentTemplate>
				<div class="divOperations">
					<asp:Button ID="btnSave" runat="server" Text="Guardar" />
					<asp:Button ID="btnClear" CausesValidation="false" runat="server" Text="Nuevo" UseSubmitBehavior="false"  />
					<asp:Button ID="btnGoBack" runat="server" Text="Volver" CausesValidation="false" UseSubmitBehavior="false" />
				</div>
			</ContentTemplate>
		</asp:UpdatePanel>
	</asp:Panel>
</asp:Content>
